package com.example.tass.domain;

import cn.tass.SRJ1933.devices.params.request.p7Sign.P7Attribute;
import cn.tass.exceptions.TAException;
import com.alibaba.fastjson.annotation.JSONField;

import java.util.List;

public class MyP7SignRequest extends MyBaseRequest{
    private String keyId;
    private Integer keyIdType;
    private String keyAccessCode;
    private String algorithm;
    private String data;
    private Integer dataType;
    private String sm2UserID;
    private boolean checkCert;
    @JSONField(
            name = "isDetach"
    )
    private boolean isDetach;
    @JSONField(
            name = "isIncludeRootCert"
    )
    private boolean isIncludeRootCert;
    @JSONField(
            name = "isIncludeAuthAttr"
    )
    private boolean isIncludeAuthAttr;
    private List<P7Attribute> authAttrList;
    private List<P7Attribute> noAuthAttrList;

    public MyP7SignRequest() {
    }

    public String getKeyId() {
        return this.keyId;
    }

    public void setKeyId(String keyId) {
        this.keyId = keyId;
    }

    public Integer getKeyIdType() {
        return this.keyIdType;
    }

    public void setKeyIdType(Integer keyIdType) {
        this.keyIdType = keyIdType;
    }

    public String getKeyAccessCode() {
        return this.keyAccessCode;
    }

    public void setKeyAccessCode(String keyAccessCode) {
        this.keyAccessCode = keyAccessCode;
    }

    public String getAlgorithm() {
        return this.algorithm;
    }

    public void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }

    public String getData() {
        return this.data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Integer getDataType() {
        return this.dataType;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }

    public String getSm2UserID() {
        return this.sm2UserID;
    }

    public void setSm2UserID(String sm2UserID) {
        this.sm2UserID = sm2UserID;
    }

    public boolean isCheckCert() {
        return this.checkCert;
    }

    public void setCheckCert(boolean checkCert) {
        this.checkCert = checkCert;
    }

    public boolean isDetach() {
        return this.isDetach;
    }

    public void setDetach(boolean detach) {
        this.isDetach = detach;
    }

    public boolean isIncludeRootCert() {
        return this.isIncludeRootCert;
    }

    public void setIncludeRootCert(boolean includeRootCert) {
        this.isIncludeRootCert = includeRootCert;
    }

    public boolean isIncludeAuthAttr() {
        return this.isIncludeAuthAttr;
    }

    public void setIncludeAuthAttr(boolean includeAuthAttr) {
        this.isIncludeAuthAttr = includeAuthAttr;
    }

    public List<P7Attribute> getAuthAttrList() {
        return this.authAttrList;
    }

    public void setAuthAttrList(List<P7Attribute> authAttrList) {
        this.authAttrList = authAttrList;
    }

    public List<P7Attribute> getNoAuthAttrList() {
        return this.noAuthAttrList;
    }

    public void setNoAuthAttrList(List<P7Attribute> noAuthAttrList) {
        this.noAuthAttrList = noAuthAttrList;
    }

    public void validate() throws TAException {
        this.checkParamIsEmpty(this.keyId, "keyId");
        this.checkParamIsEmpty(this.algorithm, "algorithm");
        this.checkParamIsEmpty(this.data, "data");
    }
}
